//
//  ForEachBootcamp.swift
//  swiftUiTest
//
//  Created by Mac on 2023/6/27.
//

import SwiftUI

struct ForEachBootcamp_15: View {
    
    let data:[String] = ["Hi","Hello","Hey everyone"]
    var dataArr:[Any] = [];
    
    let myString:String = "Hello"
    
    var body: some View {
        VStack(alignment:.leading) {
            ForEach(data.indices){index in
                HStack {
                    ZStack {
                        Circle()
                            .fill(.brown)
                            .frame(width:70,height: 70)
                            
                        Text("Hi:\(index)")
                            .foregroundColor(Color.white)
                    }
                    Text("\(data[index])")
                }
                
            }
          
        }
    }
}

struct ForEachBootcamp_Previews: PreviewProvider {
    static var previews: some View {
        ForEachBootcamp_15()
    }
}
